/**********************************************************************************************************************
 *  FILE DESCRIPTION
 *  -------------------------------------------------------------------------------------------------------------------
 *          File:  AppCtrl.c
 *        Config:  GL_Demo.dpa
 *     SW-C Type:  AppCtrl
 *
 *     Generator:  MICROSAR RTE Generator Version 4.19.0
 *                 RTE Core Version 1.19.0
 *       License:  CBD1800257
 *
 *   Description:  C-Code implementation template for SW-C <AppCtrl>
 *********************************************************************************************************************/


/**********************************************************************************************************************
 * DO NOT CHANGE THIS COMMENT!           << Start of version logging area >>                DO NOT CHANGE THIS COMMENT!
 *********************************************************************************************************************/

/* PRQA S 0777, 0779 EOF */ /* MD_MSR_5.1_777, MD_MSR_5.1_779 */
/* PRQA S 0857 EOF */ /* MD_MSR_1.1_857 */
/* PRQA S 0614 EOF */ /* MD_Rte_TestCode */

/* PRQA S 3109 EOF */ /* MD_Rte_TestCode */
/* PRQA S 3112 EOF */ /* MD_Rte_TestCode */
/* PRQA S 3197 EOF */ /* MD_Rte_TestCode */
/* PRQA S 3198 EOF */ /* MD_Rte_TestCode */
/* PRQA S 3199 EOF */ /* MD_Rte_TestCode */
/* PRQA S 3201 EOF */ /* MD_Rte_TestCode */
/* PRQA S 3203 EOF */ /* MD_Rte_TestCode */
/* PRQA S 3205 EOF */ /* MD_Rte_TestCode */
/* PRQA S 3206 EOF */ /* MD_Rte_TestCode */
/* PRQA S 3218 EOF */ /* MD_Rte_TestCode */
/* PRQA S 3229 EOF */ /* MD_Rte_TestCode */
/* PRQA S 2002 EOF */ /* MD_Rte_TestCode */
/* PRQA S 3334 EOF */ /* MD_Rte_TestCode */
/* PRQA S 3417 EOF */ /* MD_Rte_TestCode */
/* PRQA S 3426 EOF */ /* MD_Rte_TestCode */
/* PRQA S 3453 EOF */ /* MD_Rte_TestCode */

/**********************************************************************************************************************
 * DO NOT CHANGE THIS COMMENT!           << End of version logging area >>                  DO NOT CHANGE THIS COMMENT!
 *********************************************************************************************************************/

/**********************************************************************************************************************
 *
 * AUTOSAR Modelling Object Descriptions
 *
 **********************************************************************************************************************
 *
 * Data Types:
 * ===========
 * Rte_DT_SG_Sig_Grp_0x210_0
 *   
 *
 * Rte_DT_SG_Sig_Grp_0x210_1
 *   
 *
 * Rte_DT_SG_Sig_Grp_0x210_2
 *   
 *
 * Rte_DT_SG_Sig_Grp_0x210_3
 *   
 *
 * Rte_DT_SG_Sig_Grp_0x211_0
 *   
 *
 * Rte_DT_SG_Sig_Grp_0x211_1
 *   
 *
 * Rte_DT_SG_Sig_Grp_0x211_2
 *   
 *
 * Rte_DT_SG_Sig_Grp_0x211_3
 *   
 *
 * Rte_DT_SG_Sig_Grp_0x212_0
 *   
 *
 * Rte_DT_SG_Sig_Grp_0x216_0
 *   
 *
 * Rte_DT_SG_Sig_Grp_0x216_1
 *   
 *
 * Rte_DT_SG_Sig_Grp_0x300_0
 *   
 *
 * Rte_DT_SG_Sig_Grp_0x300_1
 *   
 *
 * Rte_DT_SG_Sig_Grp_0x300_2
 *   
 *
 * Rte_DT_SG_Sig_Grp_0x300_3
 *   
 *
 * Rte_DT_SG_Sig_Grp_0x301_0
 *   
 *
 * Rte_DT_SG_Sig_Grp_0x301_1
 *   
 *
 * Rte_DT_SG_Sig_Grp_0x301_2
 *   
 *
 * Rte_DT_SG_Sig_Grp_0x301_3
 *   
 *
 * Rte_DT_SG_Sig_Grp_0x304_0
 *   
 *
 * Rte_DT_SG_Sig_Grp_0x304_1
 *   
 *
 * Rte_DT_SG_Sig_Grp_0x304_2
 *   
 *
 * Rte_DT_SG_Sig_Grp_0x304_3
 *   
 *
 *********************************************************************************************************************/

#include "Rte_AppCtrl.h" /* PRQA S 0857 */ /* MD_MSR_1.1_857 */
#include "TSC_AppCtrl.h"


/**********************************************************************************************************************
 * DO NOT CHANGE THIS COMMENT!           << Start of include and declaration area >>        DO NOT CHANGE THIS COMMENT!
 *********************************************************************************************************************/

#include "string.h"

static void AppCtrl_TestDefines(void);


/**********************************************************************************************************************
 * DO NOT CHANGE THIS COMMENT!           << End of include and declaration area >>          DO NOT CHANGE THIS COMMENT!
 *********************************************************************************************************************/


/**********************************************************************************************************************
 *
 * Used AUTOSAR Data Types
 *
 **********************************************************************************************************************
 *
 * Primitive Types:
 * ================
 * uint16: Integer in interval [0...65535] (standard type)
 * uint32: Integer in interval [0...4294967295] (standard type)
 * uint8: Integer in interval [0...255] (standard type)
 *
 * Enumeration Types:
 * ==================
 * Rte_DT_SG_Sig_Grp_0x210_0: Enumeration of integer in interval [0...3] with enumerators
 *   Cx0_LED_ON (0U)
 *   Cx1_LED_OFF (1U)
 *   Cx2_Reserve (2U)
 *   Cx3_Reserve (3U)
 * Rte_DT_SG_Sig_Grp_0x210_1: Enumeration of integer in interval [0...3] with enumerators
 *   Cx0_LED_ON (0U)
 *   Cx1_LED_OFF (1U)
 *   Cx2_Reserve (2U)
 *   Cx3_Reserve (3U)
 * Rte_DT_SG_Sig_Grp_0x210_2: Enumeration of integer in interval [0...3] with enumerators
 *   Cx0_LED_ON (0U)
 *   Cx1_LED_OFF (1U)
 *   Cx2_Reserve (2U)
 *   Cx3_Reserve (3U)
 * Rte_DT_SG_Sig_Grp_0x210_3: Enumeration of integer in interval [0...3] with enumerators
 *   Cx0_LED_ON (0U)
 *   Cx1_LED_OFF (1U)
 *   Cx2_Reserve (2U)
 *   Cx3_Reserve (3U)
 * Rte_DT_SG_Sig_Grp_0x211_0: Enumeration of integer in interval [0...7] with enumerators
 *   Cx0_Button_Push (0U)
 *   Cx1_Button_Release (1U)
 *   Cx2_Reserve (2U)
 * Rte_DT_SG_Sig_Grp_0x211_1: Enumeration of integer in interval [0...7] with enumerators
 *   Cx0_Button_Push (0U)
 *   Cx1_Button_Release (1U)
 *   Cx2_Reserve (2U)
 * Rte_DT_SG_Sig_Grp_0x211_2: Enumeration of integer in interval [0...7] with enumerators
 *   Cx0_Button_Push (0U)
 *   Cx1_Button_Release (1U)
 *   Cx2_Reserve (2U)
 * Rte_DT_SG_Sig_Grp_0x211_3: Enumeration of integer in interval [0...7] with enumerators
 *   Cx0_Button_Push (0U)
 *   Cx1_Button_Release (1U)
 *   Cx2_Reserve (2U)
 * Rte_DT_SG_Sig_Grp_0x212_0: Enumeration of integer in interval [0...7] with enumerators
 *   Cx0_OFF (0U)
 *   Cx1_ON (1U)
 *   Cx2_Reserve (2U)
 * Rte_DT_SG_Sig_Grp_0x216_0: Enumeration of integer in interval [0...255] with enumerators
 *   Cx00_No_E2E_Error (0U)
 *   Cx01_Message_0x301_E2E_Error (1U)
 *   Cx02_Message_0x304_E2E_Error (2U)
 * Rte_DT_SG_Sig_Grp_0x216_1: Enumeration of integer in interval [0...255] with enumerators
 *   Cx00_No_Message_Lost (0U)
 *   Cx01_Message_0x300_Lost (1U)
 *   Cx02_Message_0x301_Lost (2U)
 *   Cx03_Message_0x302_Lost (3U)
 *   Cx04_Message_0x303_Lost (4U)
 *   Cx05_Message_0x304_Lost (5U)
 * Rte_DT_SG_Sig_Grp_0x300_0: Enumeration of integer in interval [0...3] with enumerators
 *   Cx0_Init (0U)
 *   Cx1_LED_ON (1U)
 *   Cx2_LED_OFF (2U)
 *   Cx3_Reserve (3U)
 * Rte_DT_SG_Sig_Grp_0x300_1: Enumeration of integer in interval [0...3] with enumerators
 *   Cx0_Init (0U)
 *   Cx1_LED_ON (1U)
 *   Cx2_LED_OFF (2U)
 *   Cx3_Reserve (3U)
 * Rte_DT_SG_Sig_Grp_0x300_2: Enumeration of integer in interval [0...3] with enumerators
 *   Cx0_Init (0U)
 *   Cx1_LED_ON (1U)
 *   Cx2_LED_OFF (2U)
 *   Cx3_Reserve (3U)
 * Rte_DT_SG_Sig_Grp_0x300_3: Enumeration of integer in interval [0...3] with enumerators
 *   Cx0_Init (0U)
 *   Cx1_LED_ON (1U)
 *   Cx2_LED_OFF (2U)
 *   Cx3_Reserve (3U)
 * Rte_DT_SG_Sig_Grp_0x301_0: Enumeration of integer in interval [0...3] with enumerators
 *   Cx0_Button_Mode1 (0U)
 *   Cx1_Button_Mode2 (1U)
 *   Cx2_Button_Disable (2U)
 * Rte_DT_SG_Sig_Grp_0x301_1: Enumeration of integer in interval [0...3] with enumerators
 *   Cx0_Button_Mode1 (0U)
 *   Cx1_Button_Mode2 (1U)
 *   Cx2_Button_Disable (2U)
 * Rte_DT_SG_Sig_Grp_0x301_2: Enumeration of integer in interval [0...3] with enumerators
 *   Cx0_Button_Mode1 (0U)
 *   Cx1_Button_Mode2 (1U)
 *   Cx2_Button_Disable (2U)
 * Rte_DT_SG_Sig_Grp_0x301_3: Enumeration of integer in interval [0...3] with enumerators
 *   Cx0_Button_Mode1 (0U)
 *   Cx1_Button_Mode2 (1U)
 *   Cx2_Button_Disable (2U)
 * Rte_DT_SG_Sig_Grp_0x304_0: Enumeration of integer in interval [0...15] with enumerators
 *   Cx0_Can_Control (0U)
 *   Cx1_Button_Control_Mode1 (1U)
 *   Cx2_Button_Control_Mode2 (2U)
 *   Cx3_Reserve (3U)
 * Rte_DT_SG_Sig_Grp_0x304_1: Enumeration of integer in interval [0...15] with enumerators
 *   Cx0_Can_Control (0U)
 *   Cx1_Button_Control_Mode1 (1U)
 *   Cx2_Button_Control_Mode2 (2U)
 *   Cx3_Reserve (3U)
 * Rte_DT_SG_Sig_Grp_0x304_2: Enumeration of integer in interval [0...15] with enumerators
 *   Cx0_Can_Control (0U)
 *   Cx1_Button_Control_Mode1 (1U)
 *   Cx2_Button_Control_Mode2 (2U)
 *   Cx3_Reserve (3U)
 * Rte_DT_SG_Sig_Grp_0x304_3: Enumeration of integer in interval [0...15] with enumerators
 *   Cx0_Can_Control (0U)
 *   Cx1_Button_Control_Mode1 (1U)
 *   Cx2_Button_Control_Mode2 (2U)
 *   Cx3_Reserve (3U)
 *
 * Record Types:
 * =============
 * SG_Sig_Grp_0x210: Record with elements
 *   F_Led1_State of type Rte_DT_SG_Sig_Grp_0x210_0
 *   F_Led2_State of type Rte_DT_SG_Sig_Grp_0x210_1
 *   F_Led3_State of type Rte_DT_SG_Sig_Grp_0x210_2
 *   F_Led4_State of type Rte_DT_SG_Sig_Grp_0x210_3
 * SG_Sig_Grp_0x211: Record with elements
 *   F_Button1_State of type Rte_DT_SG_Sig_Grp_0x211_0
 *   F_Button2_State of type Rte_DT_SG_Sig_Grp_0x211_1
 *   F_Button3_State of type Rte_DT_SG_Sig_Grp_0x211_2
 *   F_Button4_State of type Rte_DT_SG_Sig_Grp_0x211_3
 * SG_Sig_Grp_0x212: Record with elements
 *   F_PowerMode of type Rte_DT_SG_Sig_Grp_0x212_0
 *   SupF_Checksum_0x212 of type uint8
 *   SupF_Counter_0x212 of type uint8
 * SG_Sig_Grp_0x213: Record with elements
 *   F_AAA_Angle of type uint8
 * SG_Sig_Grp_0x214: Record with elements
 *   F_Sig_0x214_Used_1 of type uint16
 *   F_Sig_0x214_Used_2 of type uint16
 *   F_Sig_0x214_Used_3 of type uint16
 *   F_Sig_0x214_Used_5 of type uint16
 * SG_Sig_Grp_0x216: Record with elements
 *   F_Meg_E2E_Error of type Rte_DT_SG_Sig_Grp_0x216_0
 *   F_Mes_Lost_Error of type Rte_DT_SG_Sig_Grp_0x216_1
 * SG_Sig_Grp_0x300: Record with elements
 *   D_Led1_Control of type Rte_DT_SG_Sig_Grp_0x300_0
 *   D_Led2_Control of type Rte_DT_SG_Sig_Grp_0x300_1
 *   D_Led3_Control of type Rte_DT_SG_Sig_Grp_0x300_2
 *   D_Led4_Control of type Rte_DT_SG_Sig_Grp_0x300_3
 *   E2E_Reserve1_0x300 of type uint32
 *   E2E_Reserve2_0x300 of type uint32
 *   SupD_Checksum_0x300 of type uint8
 *   SupD_Counter_0x300 of type uint8
 * SG_Sig_Grp_0x301: Record with elements
 *   D_Button1_Control of type Rte_DT_SG_Sig_Grp_0x301_0
 *   D_Button2_Control of type Rte_DT_SG_Sig_Grp_0x301_1
 *   D_Button3_Control of type Rte_DT_SG_Sig_Grp_0x301_2
 *   D_Button4_Control of type Rte_DT_SG_Sig_Grp_0x301_3
 * SG_Sig_Grp_0x302: Record with elements
 *   E_Sig_0x302_Used_1 of type uint16
 *   E_Sig_0x302_Used_2 of type uint8
 *   E_Sig_0x302_Used_3 of type uint8
 * SG_Sig_Grp_0x304: Record with elements
 *   D_Led1_CtrlMode of type Rte_DT_SG_Sig_Grp_0x304_0
 *   D_Led2_CtrlMode of type Rte_DT_SG_Sig_Grp_0x304_1
 *   D_Led3_CtrlMode of type Rte_DT_SG_Sig_Grp_0x304_2
 *   D_Led4_CtrlMode of type Rte_DT_SG_Sig_Grp_0x304_3
 *   SupD_Checksum_0x304 of type uint8
 *   SupD_Counter_0x304 of type uint8
 *
 *********************************************************************************************************************/


#define AppCtrl_START_SEC_CODE
#include "AppCtrl_MemMap.h" /* PRQA S 5087 */ /* MD_MSR_19.1 */

/**********************************************************************************************************************
 *
 * Runnable Entity Name: AppCtrl_Init
 *
 *---------------------------------------------------------------------------------------------------------------------
 *
 * Executed once after the RTE is started
 *
 *********************************************************************************************************************/
/**********************************************************************************************************************
 * DO NOT CHANGE THIS COMMENT!           << Start of documentation area >>                  DO NOT CHANGE THIS COMMENT!
 * Symbol: AppCtrl_Init_doc
 *********************************************************************************************************************/


/**********************************************************************************************************************
 * DO NOT CHANGE THIS COMMENT!           << End of documentation area >>                    DO NOT CHANGE THIS COMMENT!
 *********************************************************************************************************************/

FUNC(void, AppCtrl_CODE) AppCtrl_Init(void) /* PRQA S 0850 */ /* MD_MSR_19.8 */
{
/**********************************************************************************************************************
 * DO NOT CHANGE THIS COMMENT!           << Start of runnable implementation >>             DO NOT CHANGE THIS COMMENT!
 * Symbol: AppCtrl_Init
 *********************************************************************************************************************/

  AppCtrl_TestDefines();


/**********************************************************************************************************************
 * DO NOT CHANGE THIS COMMENT!           << End of runnable implementation >>               DO NOT CHANGE THIS COMMENT!
 *********************************************************************************************************************/
}

/**********************************************************************************************************************
 *
 * Runnable Entity Name: AppCtrl_MainFunction
 *
 *---------------------------------------------------------------------------------------------------------------------
 *
 * Executed if at least one of the following trigger conditions occurred:
 *   - triggered on TimingEvent every 10ms
 *
 **********************************************************************************************************************
 *
 * Input Interfaces:
 * =================
 *   Explicit S/R API:
 *   -----------------
 *   Std_ReturnType Rte_Read_SG_Sig_Grp_0x300_SR_R_SG_Sig_Grp_0x300(SG_Sig_Grp_0x300 *data)
 *   Std_ReturnType Rte_Read_SG_Sig_Grp_0x301_SR_R_SG_Sig_Grp_0x301(SG_Sig_Grp_0x301 *data)
 *   Std_ReturnType Rte_Read_SG_Sig_Grp_0x302_SR_R_SG_Sig_Grp_0x302(SG_Sig_Grp_0x302 *data)
 *   Std_ReturnType Rte_Read_SG_Sig_Grp_0x304_SR_R_SG_Sig_Grp_0x304(SG_Sig_Grp_0x304 *data)
 *
 * Output Interfaces:
 * ==================
 *   Explicit S/R API:
 *   -----------------
 *   Std_ReturnType Rte_Write_SG_Sig_Grp_0x210_SR_S_SG_Sig_Grp_0x210(const SG_Sig_Grp_0x210 *data)
 *   Std_ReturnType Rte_Write_SG_Sig_Grp_0x211_SR_S_SG_Sig_Grp_0x211(const SG_Sig_Grp_0x211 *data)
 *   Std_ReturnType Rte_Write_SG_Sig_Grp_0x212_SR_S_SG_Sig_Grp_0x212(const SG_Sig_Grp_0x212 *data)
 *   Std_ReturnType Rte_Write_SG_Sig_Grp_0x213_SR_S_SG_Sig_Grp_0x213(const SG_Sig_Grp_0x213 *data)
 *   Std_ReturnType Rte_Write_SG_Sig_Grp_0x214_SR_S_SG_Sig_Grp_0x214(const SG_Sig_Grp_0x214 *data)
 *   Std_ReturnType Rte_Write_SG_Sig_Grp_0x216_SR_S_SG_Sig_Grp_0x216(const SG_Sig_Grp_0x216 *data)
 *
 *********************************************************************************************************************/
/**********************************************************************************************************************
 * DO NOT CHANGE THIS COMMENT!           << Start of documentation area >>                  DO NOT CHANGE THIS COMMENT!
 * Symbol: AppCtrl_MainFunction_doc
 *********************************************************************************************************************/


/**********************************************************************************************************************
 * DO NOT CHANGE THIS COMMENT!           << End of documentation area >>                    DO NOT CHANGE THIS COMMENT!
 *********************************************************************************************************************/

FUNC(void, AppCtrl_CODE) AppCtrl_MainFunction(void) /* PRQA S 0850 */ /* MD_MSR_19.8 */
{
/**********************************************************************************************************************
 * DO NOT CHANGE THIS COMMENT!           << Start of runnable implementation >>             DO NOT CHANGE THIS COMMENT!
 * Symbol: AppCtrl_MainFunction
 *********************************************************************************************************************/

  Std_ReturnType fct_status;
  boolean fct_error = 0;

  SG_Sig_Grp_0x300 Read_SG_Sig_Grp_0x300_SR_R_SG_Sig_Grp_0x300;
  SG_Sig_Grp_0x301 Read_SG_Sig_Grp_0x301_SR_R_SG_Sig_Grp_0x301;
  SG_Sig_Grp_0x302 Read_SG_Sig_Grp_0x302_SR_R_SG_Sig_Grp_0x302;
  SG_Sig_Grp_0x304 Read_SG_Sig_Grp_0x304_SR_R_SG_Sig_Grp_0x304;

  SG_Sig_Grp_0x210 Write_SG_Sig_Grp_0x210_SR_S_SG_Sig_Grp_0x210;
  SG_Sig_Grp_0x211 Write_SG_Sig_Grp_0x211_SR_S_SG_Sig_Grp_0x211;
  SG_Sig_Grp_0x212 Write_SG_Sig_Grp_0x212_SR_S_SG_Sig_Grp_0x212;
  SG_Sig_Grp_0x213 Write_SG_Sig_Grp_0x213_SR_S_SG_Sig_Grp_0x213;
  SG_Sig_Grp_0x214 Write_SG_Sig_Grp_0x214_SR_S_SG_Sig_Grp_0x214;
  SG_Sig_Grp_0x216 Write_SG_Sig_Grp_0x216_SR_S_SG_Sig_Grp_0x216;

  /*************************************************
  * Direct Function Accesses
  *************************************************/

  fct_status = TSC_AppCtrl_Rte_Read_SG_Sig_Grp_0x300_SR_R_SG_Sig_Grp_0x300(&Read_SG_Sig_Grp_0x300_SR_R_SG_Sig_Grp_0x300);
  switch (fct_status)
  {
    case RTE_E_OK:
      fct_error = 0;
      break;
    case RTE_E_UNCONNECTED:
      fct_error = 1;
      break;
    case RTE_E_NEVER_RECEIVED:
      fct_error = 1;
      break;
    case RTE_E_INVALID:
      fct_error = 1;
      break;
    case RTE_E_MAX_AGE_EXCEEDED:
      fct_error = 1;
      break;
  }

  fct_status = TSC_AppCtrl_Rte_Read_SG_Sig_Grp_0x301_SR_R_SG_Sig_Grp_0x301(&Read_SG_Sig_Grp_0x301_SR_R_SG_Sig_Grp_0x301);
  switch (fct_status)
  {
    case RTE_E_OK:
      fct_error = 0;
      break;
    case RTE_E_UNCONNECTED:
      fct_error = 1;
      break;
    case RTE_E_NEVER_RECEIVED:
      fct_error = 1;
      break;
    case RTE_E_INVALID:
      fct_error = 1;
      break;
    case RTE_E_MAX_AGE_EXCEEDED:
      fct_error = 1;
      break;
  }

  fct_status = TSC_AppCtrl_Rte_Read_SG_Sig_Grp_0x302_SR_R_SG_Sig_Grp_0x302(&Read_SG_Sig_Grp_0x302_SR_R_SG_Sig_Grp_0x302);
  switch (fct_status)
  {
    case RTE_E_OK:
      fct_error = 0;
      break;
    case RTE_E_UNCONNECTED:
      fct_error = 1;
      break;
    case RTE_E_NEVER_RECEIVED:
      fct_error = 1;
      break;
    case RTE_E_INVALID:
      fct_error = 1;
      break;
    case RTE_E_MAX_AGE_EXCEEDED:
      fct_error = 1;
      break;
  }

  fct_status = TSC_AppCtrl_Rte_Read_SG_Sig_Grp_0x304_SR_R_SG_Sig_Grp_0x304(&Read_SG_Sig_Grp_0x304_SR_R_SG_Sig_Grp_0x304);
  switch (fct_status)
  {
    case RTE_E_OK:
      fct_error = 0;
      break;
    case RTE_E_UNCONNECTED:
      fct_error = 1;
      break;
    case RTE_E_NEVER_RECEIVED:
      fct_error = 1;
      break;
    case RTE_E_INVALID:
      fct_error = 1;
      break;
    case RTE_E_MAX_AGE_EXCEEDED:
      fct_error = 1;
      break;
  }

  (void)memset(&Write_SG_Sig_Grp_0x210_SR_S_SG_Sig_Grp_0x210, 0, sizeof(Write_SG_Sig_Grp_0x210_SR_S_SG_Sig_Grp_0x210));
  fct_status = TSC_AppCtrl_Rte_Write_SG_Sig_Grp_0x210_SR_S_SG_Sig_Grp_0x210(&Write_SG_Sig_Grp_0x210_SR_S_SG_Sig_Grp_0x210);
  switch (fct_status)
  {
    case RTE_E_OK:
      fct_error = 0;
      break;
  }

  (void)memset(&Write_SG_Sig_Grp_0x211_SR_S_SG_Sig_Grp_0x211, 0, sizeof(Write_SG_Sig_Grp_0x211_SR_S_SG_Sig_Grp_0x211));
  fct_status = TSC_AppCtrl_Rte_Write_SG_Sig_Grp_0x211_SR_S_SG_Sig_Grp_0x211(&Write_SG_Sig_Grp_0x211_SR_S_SG_Sig_Grp_0x211);
  switch (fct_status)
  {
    case RTE_E_OK:
      fct_error = 0;
      break;
  }

  (void)memset(&Write_SG_Sig_Grp_0x212_SR_S_SG_Sig_Grp_0x212, 0, sizeof(Write_SG_Sig_Grp_0x212_SR_S_SG_Sig_Grp_0x212));
  fct_status = TSC_AppCtrl_Rte_Write_SG_Sig_Grp_0x212_SR_S_SG_Sig_Grp_0x212(&Write_SG_Sig_Grp_0x212_SR_S_SG_Sig_Grp_0x212);
  switch (fct_status)
  {
    case RTE_E_OK:
      fct_error = 0;
      break;
  }

  (void)memset(&Write_SG_Sig_Grp_0x213_SR_S_SG_Sig_Grp_0x213, 0, sizeof(Write_SG_Sig_Grp_0x213_SR_S_SG_Sig_Grp_0x213));
  fct_status = TSC_AppCtrl_Rte_Write_SG_Sig_Grp_0x213_SR_S_SG_Sig_Grp_0x213(&Write_SG_Sig_Grp_0x213_SR_S_SG_Sig_Grp_0x213);
  switch (fct_status)
  {
    case RTE_E_OK:
      fct_error = 0;
      break;
  }

  (void)memset(&Write_SG_Sig_Grp_0x214_SR_S_SG_Sig_Grp_0x214, 0, sizeof(Write_SG_Sig_Grp_0x214_SR_S_SG_Sig_Grp_0x214));
  fct_status = TSC_AppCtrl_Rte_Write_SG_Sig_Grp_0x214_SR_S_SG_Sig_Grp_0x214(&Write_SG_Sig_Grp_0x214_SR_S_SG_Sig_Grp_0x214);
  switch (fct_status)
  {
    case RTE_E_OK:
      fct_error = 0;
      break;
  }

  (void)memset(&Write_SG_Sig_Grp_0x216_SR_S_SG_Sig_Grp_0x216, 0, sizeof(Write_SG_Sig_Grp_0x216_SR_S_SG_Sig_Grp_0x216));
  fct_status = TSC_AppCtrl_Rte_Write_SG_Sig_Grp_0x216_SR_S_SG_Sig_Grp_0x216(&Write_SG_Sig_Grp_0x216_SR_S_SG_Sig_Grp_0x216);
  switch (fct_status)
  {
    case RTE_E_OK:
      fct_error = 0;
      break;
  }


/**********************************************************************************************************************
 * DO NOT CHANGE THIS COMMENT!           << End of runnable implementation >>               DO NOT CHANGE THIS COMMENT!
 *********************************************************************************************************************/
}


#define AppCtrl_STOP_SEC_CODE
#include "AppCtrl_MemMap.h" /* PRQA S 5087 */ /* MD_MSR_19.1 */


/**********************************************************************************************************************
 * DO NOT CHANGE THIS COMMENT!           << Start of function definition area >>            DO NOT CHANGE THIS COMMENT!
 *********************************************************************************************************************/

static void AppCtrl_TestDefines(void)
{
  /* Enumeration Data Types */

  Rte_DT_SG_Sig_Grp_0x210_0 Test_Rte_DT_SG_Sig_Grp_0x210_0_V_1 = Cx0_LED_ON;
  Rte_DT_SG_Sig_Grp_0x210_0 Test_Rte_DT_SG_Sig_Grp_0x210_0_V_2 = Cx1_LED_OFF;
  Rte_DT_SG_Sig_Grp_0x210_0 Test_Rte_DT_SG_Sig_Grp_0x210_0_V_3 = Cx2_Reserve;
  Rte_DT_SG_Sig_Grp_0x210_0 Test_Rte_DT_SG_Sig_Grp_0x210_0_V_4 = Cx3_Reserve;

  Rte_DT_SG_Sig_Grp_0x210_1 Test_Rte_DT_SG_Sig_Grp_0x210_1_V_1 = Cx0_LED_ON;
  Rte_DT_SG_Sig_Grp_0x210_1 Test_Rte_DT_SG_Sig_Grp_0x210_1_V_2 = Cx1_LED_OFF;
  Rte_DT_SG_Sig_Grp_0x210_1 Test_Rte_DT_SG_Sig_Grp_0x210_1_V_3 = Cx2_Reserve;
  Rte_DT_SG_Sig_Grp_0x210_1 Test_Rte_DT_SG_Sig_Grp_0x210_1_V_4 = Cx3_Reserve;

  Rte_DT_SG_Sig_Grp_0x210_2 Test_Rte_DT_SG_Sig_Grp_0x210_2_V_1 = Cx0_LED_ON;
  Rte_DT_SG_Sig_Grp_0x210_2 Test_Rte_DT_SG_Sig_Grp_0x210_2_V_2 = Cx1_LED_OFF;
  Rte_DT_SG_Sig_Grp_0x210_2 Test_Rte_DT_SG_Sig_Grp_0x210_2_V_3 = Cx2_Reserve;
  Rte_DT_SG_Sig_Grp_0x210_2 Test_Rte_DT_SG_Sig_Grp_0x210_2_V_4 = Cx3_Reserve;

  Rte_DT_SG_Sig_Grp_0x210_3 Test_Rte_DT_SG_Sig_Grp_0x210_3_V_1 = Cx0_LED_ON;
  Rte_DT_SG_Sig_Grp_0x210_3 Test_Rte_DT_SG_Sig_Grp_0x210_3_V_2 = Cx1_LED_OFF;
  Rte_DT_SG_Sig_Grp_0x210_3 Test_Rte_DT_SG_Sig_Grp_0x210_3_V_3 = Cx2_Reserve;
  Rte_DT_SG_Sig_Grp_0x210_3 Test_Rte_DT_SG_Sig_Grp_0x210_3_V_4 = Cx3_Reserve;

  Rte_DT_SG_Sig_Grp_0x211_0 Test_Rte_DT_SG_Sig_Grp_0x211_0_V_1 = Cx0_Button_Push;
  Rte_DT_SG_Sig_Grp_0x211_0 Test_Rte_DT_SG_Sig_Grp_0x211_0_V_2 = Cx1_Button_Release;
  Rte_DT_SG_Sig_Grp_0x211_0 Test_Rte_DT_SG_Sig_Grp_0x211_0_V_3 = Cx2_Reserve;

  Rte_DT_SG_Sig_Grp_0x211_1 Test_Rte_DT_SG_Sig_Grp_0x211_1_V_1 = Cx0_Button_Push;
  Rte_DT_SG_Sig_Grp_0x211_1 Test_Rte_DT_SG_Sig_Grp_0x211_1_V_2 = Cx1_Button_Release;
  Rte_DT_SG_Sig_Grp_0x211_1 Test_Rte_DT_SG_Sig_Grp_0x211_1_V_3 = Cx2_Reserve;

  Rte_DT_SG_Sig_Grp_0x211_2 Test_Rte_DT_SG_Sig_Grp_0x211_2_V_1 = Cx0_Button_Push;
  Rte_DT_SG_Sig_Grp_0x211_2 Test_Rte_DT_SG_Sig_Grp_0x211_2_V_2 = Cx1_Button_Release;
  Rte_DT_SG_Sig_Grp_0x211_2 Test_Rte_DT_SG_Sig_Grp_0x211_2_V_3 = Cx2_Reserve;

  Rte_DT_SG_Sig_Grp_0x211_3 Test_Rte_DT_SG_Sig_Grp_0x211_3_V_1 = Cx0_Button_Push;
  Rte_DT_SG_Sig_Grp_0x211_3 Test_Rte_DT_SG_Sig_Grp_0x211_3_V_2 = Cx1_Button_Release;
  Rte_DT_SG_Sig_Grp_0x211_3 Test_Rte_DT_SG_Sig_Grp_0x211_3_V_3 = Cx2_Reserve;

  Rte_DT_SG_Sig_Grp_0x212_0 Test_Rte_DT_SG_Sig_Grp_0x212_0_V_1 = Cx0_OFF;
  Rte_DT_SG_Sig_Grp_0x212_0 Test_Rte_DT_SG_Sig_Grp_0x212_0_V_2 = Cx1_ON;
  Rte_DT_SG_Sig_Grp_0x212_0 Test_Rte_DT_SG_Sig_Grp_0x212_0_V_3 = Cx2_Reserve;

  Rte_DT_SG_Sig_Grp_0x216_0 Test_Rte_DT_SG_Sig_Grp_0x216_0_V_1 = Cx00_No_E2E_Error;
  Rte_DT_SG_Sig_Grp_0x216_0 Test_Rte_DT_SG_Sig_Grp_0x216_0_V_2 = Cx01_Message_0x301_E2E_Error;
  Rte_DT_SG_Sig_Grp_0x216_0 Test_Rte_DT_SG_Sig_Grp_0x216_0_V_3 = Cx02_Message_0x304_E2E_Error;

  Rte_DT_SG_Sig_Grp_0x216_1 Test_Rte_DT_SG_Sig_Grp_0x216_1_V_1 = Cx00_No_Message_Lost;
  Rte_DT_SG_Sig_Grp_0x216_1 Test_Rte_DT_SG_Sig_Grp_0x216_1_V_2 = Cx01_Message_0x300_Lost;
  Rte_DT_SG_Sig_Grp_0x216_1 Test_Rte_DT_SG_Sig_Grp_0x216_1_V_3 = Cx02_Message_0x301_Lost;
  Rte_DT_SG_Sig_Grp_0x216_1 Test_Rte_DT_SG_Sig_Grp_0x216_1_V_4 = Cx03_Message_0x302_Lost;
  Rte_DT_SG_Sig_Grp_0x216_1 Test_Rte_DT_SG_Sig_Grp_0x216_1_V_5 = Cx04_Message_0x303_Lost;
  Rte_DT_SG_Sig_Grp_0x216_1 Test_Rte_DT_SG_Sig_Grp_0x216_1_V_6 = Cx05_Message_0x304_Lost;

  Rte_DT_SG_Sig_Grp_0x300_0 Test_Rte_DT_SG_Sig_Grp_0x300_0_V_1 = Cx0_Init;
  Rte_DT_SG_Sig_Grp_0x300_0 Test_Rte_DT_SG_Sig_Grp_0x300_0_V_2 = Cx1_LED_ON;
  Rte_DT_SG_Sig_Grp_0x300_0 Test_Rte_DT_SG_Sig_Grp_0x300_0_V_3 = Cx2_LED_OFF;
  Rte_DT_SG_Sig_Grp_0x300_0 Test_Rte_DT_SG_Sig_Grp_0x300_0_V_4 = Cx3_Reserve;

  Rte_DT_SG_Sig_Grp_0x300_1 Test_Rte_DT_SG_Sig_Grp_0x300_1_V_1 = Cx0_Init;
  Rte_DT_SG_Sig_Grp_0x300_1 Test_Rte_DT_SG_Sig_Grp_0x300_1_V_2 = Cx1_LED_ON;
  Rte_DT_SG_Sig_Grp_0x300_1 Test_Rte_DT_SG_Sig_Grp_0x300_1_V_3 = Cx2_LED_OFF;
  Rte_DT_SG_Sig_Grp_0x300_1 Test_Rte_DT_SG_Sig_Grp_0x300_1_V_4 = Cx3_Reserve;

  Rte_DT_SG_Sig_Grp_0x300_2 Test_Rte_DT_SG_Sig_Grp_0x300_2_V_1 = Cx0_Init;
  Rte_DT_SG_Sig_Grp_0x300_2 Test_Rte_DT_SG_Sig_Grp_0x300_2_V_2 = Cx1_LED_ON;
  Rte_DT_SG_Sig_Grp_0x300_2 Test_Rte_DT_SG_Sig_Grp_0x300_2_V_3 = Cx2_LED_OFF;
  Rte_DT_SG_Sig_Grp_0x300_2 Test_Rte_DT_SG_Sig_Grp_0x300_2_V_4 = Cx3_Reserve;

  Rte_DT_SG_Sig_Grp_0x300_3 Test_Rte_DT_SG_Sig_Grp_0x300_3_V_1 = Cx0_Init;
  Rte_DT_SG_Sig_Grp_0x300_3 Test_Rte_DT_SG_Sig_Grp_0x300_3_V_2 = Cx1_LED_ON;
  Rte_DT_SG_Sig_Grp_0x300_3 Test_Rte_DT_SG_Sig_Grp_0x300_3_V_3 = Cx2_LED_OFF;
  Rte_DT_SG_Sig_Grp_0x300_3 Test_Rte_DT_SG_Sig_Grp_0x300_3_V_4 = Cx3_Reserve;

  Rte_DT_SG_Sig_Grp_0x301_0 Test_Rte_DT_SG_Sig_Grp_0x301_0_V_1 = Cx0_Button_Mode1;
  Rte_DT_SG_Sig_Grp_0x301_0 Test_Rte_DT_SG_Sig_Grp_0x301_0_V_2 = Cx1_Button_Mode2;
  Rte_DT_SG_Sig_Grp_0x301_0 Test_Rte_DT_SG_Sig_Grp_0x301_0_V_3 = Cx2_Button_Disable;

  Rte_DT_SG_Sig_Grp_0x301_1 Test_Rte_DT_SG_Sig_Grp_0x301_1_V_1 = Cx0_Button_Mode1;
  Rte_DT_SG_Sig_Grp_0x301_1 Test_Rte_DT_SG_Sig_Grp_0x301_1_V_2 = Cx1_Button_Mode2;
  Rte_DT_SG_Sig_Grp_0x301_1 Test_Rte_DT_SG_Sig_Grp_0x301_1_V_3 = Cx2_Button_Disable;

  Rte_DT_SG_Sig_Grp_0x301_2 Test_Rte_DT_SG_Sig_Grp_0x301_2_V_1 = Cx0_Button_Mode1;
  Rte_DT_SG_Sig_Grp_0x301_2 Test_Rte_DT_SG_Sig_Grp_0x301_2_V_2 = Cx1_Button_Mode2;
  Rte_DT_SG_Sig_Grp_0x301_2 Test_Rte_DT_SG_Sig_Grp_0x301_2_V_3 = Cx2_Button_Disable;

  Rte_DT_SG_Sig_Grp_0x301_3 Test_Rte_DT_SG_Sig_Grp_0x301_3_V_1 = Cx0_Button_Mode1;
  Rte_DT_SG_Sig_Grp_0x301_3 Test_Rte_DT_SG_Sig_Grp_0x301_3_V_2 = Cx1_Button_Mode2;
  Rte_DT_SG_Sig_Grp_0x301_3 Test_Rte_DT_SG_Sig_Grp_0x301_3_V_3 = Cx2_Button_Disable;

  Rte_DT_SG_Sig_Grp_0x304_0 Test_Rte_DT_SG_Sig_Grp_0x304_0_V_1 = Cx0_Can_Control;
  Rte_DT_SG_Sig_Grp_0x304_0 Test_Rte_DT_SG_Sig_Grp_0x304_0_V_2 = Cx1_Button_Control_Mode1;
  Rte_DT_SG_Sig_Grp_0x304_0 Test_Rte_DT_SG_Sig_Grp_0x304_0_V_3 = Cx2_Button_Control_Mode2;
  Rte_DT_SG_Sig_Grp_0x304_0 Test_Rte_DT_SG_Sig_Grp_0x304_0_V_4 = Cx3_Reserve;

  Rte_DT_SG_Sig_Grp_0x304_1 Test_Rte_DT_SG_Sig_Grp_0x304_1_V_1 = Cx0_Can_Control;
  Rte_DT_SG_Sig_Grp_0x304_1 Test_Rte_DT_SG_Sig_Grp_0x304_1_V_2 = Cx1_Button_Control_Mode1;
  Rte_DT_SG_Sig_Grp_0x304_1 Test_Rte_DT_SG_Sig_Grp_0x304_1_V_3 = Cx2_Button_Control_Mode2;
  Rte_DT_SG_Sig_Grp_0x304_1 Test_Rte_DT_SG_Sig_Grp_0x304_1_V_4 = Cx3_Reserve;

  Rte_DT_SG_Sig_Grp_0x304_2 Test_Rte_DT_SG_Sig_Grp_0x304_2_V_1 = Cx0_Can_Control;
  Rte_DT_SG_Sig_Grp_0x304_2 Test_Rte_DT_SG_Sig_Grp_0x304_2_V_2 = Cx1_Button_Control_Mode1;
  Rte_DT_SG_Sig_Grp_0x304_2 Test_Rte_DT_SG_Sig_Grp_0x304_2_V_3 = Cx2_Button_Control_Mode2;
  Rte_DT_SG_Sig_Grp_0x304_2 Test_Rte_DT_SG_Sig_Grp_0x304_2_V_4 = Cx3_Reserve;

  Rte_DT_SG_Sig_Grp_0x304_3 Test_Rte_DT_SG_Sig_Grp_0x304_3_V_1 = Cx0_Can_Control;
  Rte_DT_SG_Sig_Grp_0x304_3 Test_Rte_DT_SG_Sig_Grp_0x304_3_V_2 = Cx1_Button_Control_Mode1;
  Rte_DT_SG_Sig_Grp_0x304_3 Test_Rte_DT_SG_Sig_Grp_0x304_3_V_3 = Cx2_Button_Control_Mode2;
  Rte_DT_SG_Sig_Grp_0x304_3 Test_Rte_DT_SG_Sig_Grp_0x304_3_V_4 = Cx3_Reserve;
}

/**********************************************************************************************************************
 * DO NOT CHANGE THIS COMMENT!           << End of function definition area >>              DO NOT CHANGE THIS COMMENT!
 *********************************************************************************************************************/


/**********************************************************************************************************************
 * DO NOT CHANGE THIS COMMENT!           << Start of removed code area >>                   DO NOT CHANGE THIS COMMENT!
 *********************************************************************************************************************/


/**********************************************************************************************************************
 * DO NOT CHANGE THIS COMMENT!           << End of removed code area >>                     DO NOT CHANGE THIS COMMENT!
 *********************************************************************************************************************/

/**********************************************************************************************************************
 MISRA 2004 violations and justifications
 *********************************************************************************************************************/

/* module specific MISRA deviations:
   MD_Rte_TestCode:
     Reason:     This justification is used within the generated test code by the Rte Analyzer.
     Risk:       No functional risk.
     Prevention: Not required.

*/
